package com.xiaotu.spider.tvsou.pageprocessor;

import com.xiaotu.common.util.*;
import com.xiaotu.spider.APageProcessor;
import net.sf.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import us.codecraft.webmagic.Page;
import us.codecraft.webmagic.Request;

/**
 * @类名 TVSouSetsPageProcessor
 * @日期 2017年2月13日
 * @作者 高海军
 * @功能 tvsou的分集梗概信息爬取
 */
@Component("TVSouSetsPageProcessor")
@Scope("prototype")
public class TVSouSetsPageProcessor extends APageProcessor
{
    private static final Logger LOGGER = LoggerFactory
            .getLogger(TVSouSetsPageProcessor.class);

    @Override
    protected Request getStartRequest(JSONObject target)
    {
        return new Request("http://so.iqiyi.com/so/q_"
                + KeywordEncode.encode(target.getString("tvName"))
                + "?source=input&sr=246776524452");
    }

    @Override
    protected String getSpiderType()
    {
        return Constants.SpiderTaskType.TV_IQIYI;
    }

    @Override
    public String getPageDataType(Page page)
    {
        return null;
    }

    @Override
    public void process(Page page)
    {
    }


}
